#ifndef MIDI_MSG_H
#define MIDI_MSG_H

#include "stdafx.h"    // For DWORD data type


//---------------------------------------------------------------------
// Forward declarations
//---------------------------------------------------------------------


namespace midi
{
    class CMIDIOutDevice;
}


namespace midi
{
    //------------------------------------------------------------------
    // CMIDIMsg class
    //
    // This class represents the base class for all MIDI messages.
    //------------------------------------------------------------------

    class CMIDIMsg
    {
    public:
        virtual ~CMIDIMsg() {}

        // Sends MIDI message
        virtual void SendMsg(midi::CMIDIOutDevice &OutDevice) = 0; 

        // Gets the MIDI message length
        virtual DWORD GetLength() const = 0;

        // Gets the MIDI message
        virtual const char *GetMsg() const = 0;

        // Get/Set time stamp
        DWORD GetTimeStamp() const { return m_TimeStamp; }
        void SetTimeStamp(DWORD TimeStamp) { m_TimeStamp = TimeStamp; }

    private:
        DWORD m_TimeStamp;
    };
}


#endif